# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=njsscan
pkgver=0.3.1
pkgrel=7
pkgdesc='A static application testing (SAST) tool that can find insecure code patterns in your node.js applications.'
groups=('blackarch' 'blackarch-code-audit')
arch=('any')
url='https://pypi.org/project/njsscan/#files'
license=('GPL2')
depends=('python' 'python-libsast' 'python-tabulate' 'python-sarif-om'
         'python-jschema-to-python' 'python-pbr' 'python-jsonpickle'
         'python-libsast' 'semgrep' 'python-colorama'
         'python-ruamel-yaml')
makedepends=('python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${pkgname::1}/$pkgname/$pkgname-$pkgver.tar.gz")
sha512sums=('9ef3fdaa3cb7f780458204b723071d051fa3618794555c732aa072efc11cf8b96a5b8a81631f74002c88db521a0b66885f16f44c6492919db41ca27ad1e4e524')
install="$pkgname.install"

build() {
  cd "$pkgname-$pkgver"

  python setup.py build
}

package() {
  cd "$pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

